/**
 * 
 */
package com.gr.staffpm.charts;

import org.joda.time.DateTime;
import org.wicketstuff.flot.TickCollection;
import org.wicketstuff.flot.TickDataSet;


/**
 * @author Graham Rhodes 6 Apr 2011 09:27:10
 */
public class FlotUtils {

    public static TickCollection getTicksForWeeksBetween(DateTime time, int amountOfWeeks) {
        TickDataSet[] tickDataSet = new TickDataSet[amountOfWeeks];
        for (int i = 0; i < amountOfWeeks; i++) {
            tickDataSet[i] = new TickDataSet(time.getMillis(), time.toString("dd MMM"));
            time = time.plusDays(7);
        }
        return new TickCollection(tickDataSet);
    }

}
